Skip to content

Conversation

markusguenther
Copy link
Member

This change addresses React warnings related to invalid DOM attributes:

  • Removed executeCommand and formattingUnderCursor from being passed to DOM elements.
  • Ensured these props are only handled within components where they are relevant, preventing them from being incorrectly rendered on DOM elements.

These update prevent unnecessary warnings in the console.

Resolves: #3894

This change addresses React warnings related to invalid DOM attributes:
- Removed `executeCommand` and `formattingUnderCursor` from being passed to DOM elements.
- Ensured these props are only handled within components where they are relevant, preventing them from being incorrectly rendered on DOM elements.

These update prevent unnecessary warnings in the console.

Resolves: neos#3894
@github-actions github-actions bot added Bug Label to mark the change as bugfix 8.3 labels Dec 10, 2024
Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for elaborating on the comment, i had a more deep look into it myself and now im pretty sure this is the wrong place.

The code plugin is actually shipped with the Neos.Demo and registered there: https://github.com/neos/Neos.Demo/blob/6ac18378d6d54a87663c8e20fe4eef1e30a50a3f/Resources/Private/CodeTagPlugin/src/manifest.js#L28

And here in the rendering we can also see the mistake, as we just pass the finalProps directly to the button without omitting anything:

https://github.com/neos/Neos.Demo/blob/6ac18378d6d54a87663c8e20fe4eef1e30a50a3f/Resources/Private/CodeTagPlugin/src/IconButtonComponent.jsx#L7

Omitting the props in the Ui based on the arbitrary name is too high-level.

Copy link
Member

@Sebobo Sebobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, this is too specific. I encountered the same issues with the toolbar when working on the toolbar UX changes in #3972.

The problem is that f.e. the toolbar renders the registered components with all props and our Button components forwards all props to their innermost button element.
That's something we would have to fix there I think, as the plugin developer has no influence over that.

@mhsdesign mhsdesign marked this pull request as draft August 18, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.3 Bug Label to mark the change as bugfix CKEditor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants